#ifndef GETATTENTIONSTASK_H
#define GETATTENTIONSTASK_H

#include "libs/base/task/task.h"
#include "libs/core/model/attention.h"
#include <QList>
#include <QPointer>

namespace yc {
class Downloader;
}

class GetAttentionsTask : public yc::Task
{
    Q_OBJECT
public:
    explicit GetAttentionsTask(QObject* parent = nullptr);

private:
    void startImpl() override;

    void getAttentions(int page_num);
    void getPresenters();
    void downloadAvatars();
    void addAttentions();

    QList<yc::Attention> attentions_;
    QPointer<yc::Downloader> downloader_;
    int pos_;
};

#endif // GETATTENTIONSTASK_H
